package com.shop.service.impl;

import java.util.List;

import com.shop.bean.OrderItem;
import com.shop.dao.IOrderItemDao;
import com.shop.dao.impl.OrderItemDaoImpl;
import com.shop.service.IOrderItemService;

/** 
 * @className: OrderItemServiceImpl.java
 * @classDescription: 
 * @function: 
 * @author: Wentasy
 * @createTime: 2012-11-1 下午07:19:19
 * @modifyTime: 
 * @modifyReason: 
 * @since: JDK 1.6
 */
public class OrderItemServiceImpl implements IOrderItemService{
	
	private IOrderItemDao orderItemDao = new OrderItemDaoImpl();
	public int createOrderItem(OrderItem orderItem) throws Exception {
		return orderItemDao.createOrderItem(orderItem) ;
	}

	public int deleteOrderItemById(long orderItemId) throws Exception {
		
		return this.orderItemDao.deleteOrderItemById(orderItemId);
	}

	public List<OrderItem> queryAllOrderItem() throws Exception {
		return this.orderItemDao.queryAllOrderItem();
	}

	public List<OrderItem> queryAllOrderItem(int startPage, int pageSize)
			throws Exception {
		return this.orderItemDao.queryAllOrderItem(startPage, pageSize);
	}

	public OrderItem queryOrderItemById(long orderItemId) throws Exception {
		return this.queryOrderItemById(orderItemId);
	}

	public List<OrderItem> queryOrderItemByOrderId(long orderId)
			throws Exception {
		// TODO Auto-generated method stub
		return this.queryOrderItemByOrderId(orderId);
	}

	public int updateOrderItem(OrderItem orderItem) throws Exception {
		return this.orderItemDao.updateOrderItem(orderItem);
	}
	
}
